package com.itheima.consumer.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.rabbit.retry.MessageRecoverer;
import org.springframework.amqp.rabbit.retry.RepublishMessageRecoverer;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 初始化的交换机和消息队列
 * @className:DirectConfig
 * @date: 2025/7/7 下午7:41
 * @description:
 */
@Configuration
public class DirectConfig {
    //@Bean
    //public DirectExchange directExchange() {
    //    return new DirectExchange("hmall.direct");
    //}
    //
    //@Bean
    //public Queue directQueue() {
    //    return new Queue("direct.queue");
    //}
    //
    //@Bean
    //public Binding directBinding(Queue directQueue, DirectExchange directExchange) {
    //   return BindingBuilder.bind(directQueue).to(directExchange).with("red");
    //}

}
